<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let salary = prompt('输入余额')
        let water = prompt('输入水费')
        let dian = prompt('输入电费')
        let inter = prompt('输入网费')
        let together = salary - water - dian - inter
        console.log(salary);
        console.log(water);
        console.log(dian);
        console.log(inter);
        console.log(together);


        document.write(`
            <table border="1">
                <tr>
                    <th>总额</th>
                    <th>水费</th>
                    <th>电费</th>
                    <th>网费</th>
                    <th>余额</th>
                </tr>

                <tr>
                    <td>${salary}</td>
                    <td>${water}</td>
                    <td>${dian}</td>
                    <td>${inter}</td>
                    <td>${together}</td>
                </tr>
            </table>
        `)
    </script>



</body>

</html>